<%@ page isELIgnored="true" %>

<script id="app_tpl" type="text/x-blacktea-template">
	<a class="cell" target="_blank" href="/app?pkg=${packageName}&peer=${fn:peer}">
		<img id="${fn:imageId}" src="http://hotwebproxy.appspot.com/icon/${packageName}?peer=${fn:peer}&cid=${fn:cid}&tag=${fn:imageId}" />
		<div class="caption">${label}</div>
	</a>
</script>

<script type="text/javascript">
//cdata
function formatApp(data, id) {
	var tid = 'app_tpl', br = '<br style="clear: both;" />', max = 7, 
		fn = { 
			peer: (id ? id : data['site.id'] || ''),
			cid: cdata.cid,
			imageId: function (idx) { return 'appicon_' + idx; } 
		};
	return blacktea(tid, data.apps, fn, br, max);
}
</script>